#pragma warning disable 0618
using System;
using System.Collections.Generic;
using Table.DataModel;
namespace Table.Dao
{
    public class TableSailorModelDao:DaoBase<TableSailorModel>
    {
        public override string GetFileName()
        {
            return "TableSailorModel.csv";
        }
        public override void BuildIndex()
        {
            if (cacheList != null)
            {
                cachePrimaryInt = new Dictionary<int, TableSailorModel>(cacheList.Count);
            }
            base.BuildIndex();
        }
        public override void AddPrimaryIndex(TableSailorModel model)
        {
            #if UNITY_EDITOR
            if(cachePrimaryInt.ContainsKey(model.ModelId)) UnityEngine.Debug.LogError("数据表id重复:TableSailorModel->id: " + model.ModelId);
            #endif
            cachePrimaryInt[model.ModelId] = model;
        }
        protected override TableSailorModel ParseRowData(string[] rowData)
        {
            TableSailorModel data = new TableSailorModel();
            if (!string.IsNullOrEmpty(rowData[0]))
            {
                data.ModelId = int.Parse(rowData[0]);
            }
            if (!string.IsNullOrEmpty(rowData[1]))
            {
                data.ModelRes = rowData[1];
            }
            if (!string.IsNullOrEmpty(rowData[2]))
            {
                data.IsMain = int.Parse(rowData[2]);
            }
            if (!string.IsNullOrEmpty(rowData[3]))
            {
                data.IsHaveLowModel = int.Parse(rowData[3]);
            }
            if (!string.IsNullOrEmpty(rowData[4]))
            {
                data.ModelScale = double.Parse(rowData[4]);
            }
            if (!string.IsNullOrEmpty(rowData[5]))
            {
                data.StandHeight = double.Parse(rowData[5]);
            }
            if (!string.IsNullOrEmpty(rowData[6]))
            {
                data.Height = double.Parse(rowData[6]);
            }
            if (!string.IsNullOrEmpty(rowData[7]))
            {
                data.Radius = double.Parse(rowData[7]);
            }
            if (!string.IsNullOrEmpty(rowData[8]))
            {
                data.DefaultFoundBone = string.Intern(rowData[8]);
            }
            if (!string.IsNullOrEmpty(rowData[9]))
            {
                data.RushJumpbType = int.Parse(rowData[9]);
            }
            if (!string.IsNullOrEmpty(rowData[10]))
            {
                data.RushAniStartTime = double.Parse(rowData[10]);
            }
            if (!string.IsNullOrEmpty(rowData[11]))
            {
                data.RushAniStopTime = double.Parse(rowData[11]);
            }
            if (!string.IsNullOrEmpty(rowData[12]))
            {
                data.RushParticle = int.Parse(rowData[12]);
            }
            if (!string.IsNullOrEmpty(rowData[13]))
            {
                data.RushEndParticle = int.Parse(rowData[13]);
            }
            if (!string.IsNullOrEmpty(rowData[14]))
            {
                data.JumpbStartTime = double.Parse(rowData[14]);
            }
            if (!string.IsNullOrEmpty(rowData[15]))
            {
                data.JumpbStopTime = double.Parse(rowData[15]);
            }
            if (!string.IsNullOrEmpty(rowData[16]))
            {
                data.JumpbParticle = int.Parse(rowData[16]);
            }
            if (!string.IsNullOrEmpty(rowData[17]))
            {
                data.JumpbEndParticle = int.Parse(rowData[17]);
            }
            if (!string.IsNullOrEmpty(rowData[18]))
            {
                data.DeathDuration = double.Parse(rowData[18]);
            }
            if (!string.IsNullOrEmpty(rowData[19]))
            {
                data.RecruitCamX = float.Parse(rowData[19]);
            }
            if (!string.IsNullOrEmpty(rowData[20]))
            {
                data.RecruitCamY = float.Parse(rowData[20]);
            }
            if (!string.IsNullOrEmpty(rowData[21]))
            {
                data.RecruitCamZ = float.Parse(rowData[21]);
            }
            if (!string.IsNullOrEmpty(rowData[22]))
            {
                data.RecruitScale = float.Parse(rowData[22]);
            }
            if (!string.IsNullOrEmpty(rowData[23]))
            {
                data.IsPlayerSceneParticle = ParseData<int>(rowData[23]);
            }
            if (!string.IsNullOrEmpty(rowData[24]))
            {
                data.ParticleIds = ParseData<int>(rowData[24]);
            }
            if (!string.IsNullOrEmpty(rowData[25]))
            {
                data.ParticleArgs = ParseData(rowData[25]);
            }
            if (!string.IsNullOrEmpty(rowData[26]))
            {
                data.AdditionMaterialArgs = rowData[26];
            }
            if (!string.IsNullOrEmpty(rowData[27]))
            {
                data.BeConvoyParticleIds = ParseData<int>(rowData[27]);
            }
            if (!string.IsNullOrEmpty(rowData[28]))
            {
                data.BeConvoyParticleArgs = ParseData(rowData[28]);
            }
            if (!string.IsNullOrEmpty(rowData[29]))
            {
                data.DisplayAni = string.Intern(rowData[29]);
            }
            if (!string.IsNullOrEmpty(rowData[30]))
            {
                data.Run02DetalValue = double.Parse(rowData[30]);
            }
            if (!string.IsNullOrEmpty(rowData[31]))
            {
                data.SwitchRun02Condition = ParseData(rowData[31]);
            }
            if (!string.IsNullOrEmpty(rowData[32]))
            {
                data.DeathShowType = int.Parse(rowData[32]);
            }
            if (!string.IsNullOrEmpty(rowData[33]))
            {
                data.DeathShowArgs = rowData[33];
            }
            if (!string.IsNullOrEmpty(rowData[34]))
            {
                data.IsHuge = int.Parse(rowData[34]);
            }
            if (!string.IsNullOrEmpty(rowData[35]))
            {
                data.HugeModelViewScale = float.Parse(rowData[35]);
            }
            if (!string.IsNullOrEmpty(rowData[36]))
            {
                data.HugeModelHpBarHeight = float.Parse(rowData[36]);
            }
            if (!string.IsNullOrEmpty(rowData[37]))
            {
                data.SpecialType = int.Parse(rowData[37]);
            }
            return data;
        }
    }
}
